#pragma once

//All scene graph objects are derived from this class
#include <list>

//#include <windows.h>		// Header File For Windows

#include "Shape.h"



class SceneNode
{
public:
	SceneNode();

	SceneNode(Shape * s);

	virtual ~SceneNode();

	void Release();

	// update our scene node
	virtual void Update(double frameTime);

	
	virtual void Draw();
	// destroy all the children
	void Destroy();
	  // add a child to our custody
	void AddChild( SceneNode* pNode );

	void UpdatePosition(D3DXVECTOR3 pos);
	void UpdatePosition(float xpos, float ypos, float zpos);

	void SetAcceleration(D3DXVECTOR3 pos);
	void SetVelocity(D3DXVECTOR3 pos);
	void SetVelocity(float xpos, float ypos, float zpos);
	void SetPosition(float x, float y, float z);

	void SetScale(float x, float y, float z);

	void SetVisible(bool isVisible);


public:
  // list of children
  std::list<SceneNode*> m_lstChildren;

  SceneNode * parent;

  Shape * shape;

  D3DXVECTOR3 * position;
  D3DXVECTOR3 * rotation;

  D3DXVECTOR3 * velocity;
  D3DXVECTOR3 * acceleration;
  D3DXVECTOR3 * scale;

  std::wstring name; //name of the object (makes it easier to debug)

  bool isVisible;

};
